import { Sequelize } from "sequelize";
export let sequelize =new Sequelize({
    dialect:'sqlite',
    storage:'./db.db'
})
export const sync=async()=>{
    let{Blog}=await import('../model/Blog.js')
    await sequelize.sync({force:true})
   
    let arr =[
        {
            title:'1223',
            author:'开凿'
        },
        {
            title:'1223',
            author:'开凿'
        },
        {
            title:'1223',
            author:'开凿'
        },
        {
            title:'1223',
            author:'开凿'
        },
        {
            title:'1223',
            author:'开凿'
        },
        {
            title:'1223',
            author:'开凿'
        },
        {
            title:'1223',
            author:'开凿'
        },
    ]
    Blog.bulkCreate(arr)
}